//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension EFS {
    // MARK: Enums

    public enum LifeCycleState: String, CustomStringConvertible, Codable {
        case available
        case creating
        case deleted
        case deleting
        case updating
        public var description: String { return self.rawValue }
    }

    public enum PerformanceMode: String, CustomStringConvertible, Codable {
        case generalpurpose = "generalPurpose"
        case maxio = "maxIO"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case disabling = "DISABLING"
        case enabled = "ENABLED"
        case enabling = "ENABLING"
        public var description: String { return self.rawValue }
    }

    public enum ThroughputMode: String, CustomStringConvertible, Codable {
        case bursting
        case provisioned
        public var description: String { return self.rawValue }
    }

    public enum TransitionToIARules: String, CustomStringConvertible, Codable {
        case after14Days = "AFTER_14_DAYS"
        case after30Days = "AFTER_30_DAYS"
        case after60Days = "AFTER_60_DAYS"
        case after7Days = "AFTER_7_DAYS"
        case after90Days = "AFTER_90_DAYS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccessPointDescription: AWSDecodableShape {
        /// The unique Amazon Resource Name (ARN) associated with the access point.
        public let accessPointArn: String?
        /// The ID of the access point, assigned by Amazon EFS.
        public let accessPointId: String?
        /// The opaque string specified in the request to ensure idempotent creation.
        public let clientToken: String?
        /// The ID of the EFS file system that the access point applies to.
        public let fileSystemId: String?
        /// Identifies the lifecycle phase of the access point.
        public let lifeCycleState: LifeCycleState?
        /// The name of the access point. This is the value of the Name tag.
        public let name: String?
        /// Identified the AWS account that owns the access point resource.
        public let ownerId: String?
        /// The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.
        public let posixUser: PosixUser?
        /// The directory on the Amazon EFS file system that the access point exposes as the root directory to NFS clients using the access point.
        public let rootDirectory: RootDirectory?
        /// The tags associated with the access point, presented as an array of Tag objects.
        public let tags: [Tag]?

        public init(accessPointArn: String? = nil, accessPointId: String? = nil, clientToken: String? = nil, fileSystemId: String? = nil, lifeCycleState: LifeCycleState? = nil, name: String? = nil, ownerId: String? = nil, posixUser: PosixUser? = nil, rootDirectory: RootDirectory? = nil, tags: [Tag]? = nil) {
            self.accessPointArn = accessPointArn
            self.accessPointId = accessPointId
            self.clientToken = clientToken
            self.fileSystemId = fileSystemId
            self.lifeCycleState = lifeCycleState
            self.name = name
            self.ownerId = ownerId
            self.posixUser = posixUser
            self.rootDirectory = rootDirectory
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case accessPointArn = "AccessPointArn"
            case accessPointId = "AccessPointId"
            case clientToken = "ClientToken"
            case fileSystemId = "FileSystemId"
            case lifeCycleState = "LifeCycleState"
            case name = "Name"
            case ownerId = "OwnerId"
            case posixUser = "PosixUser"
            case rootDirectory = "RootDirectory"
            case tags = "Tags"
        }
    }

    public struct BackupPolicy: AWSEncodableShape & AWSDecodableShape {
        /// Describes the status of the file system's backup policy.     ENABLED - EFS is automatically backing up the file system.      ENABLING - EFS is turning on automatic backups for the file system.      DISABLED - automatic back ups are turned off for the file system.      DISABLED - EFS is turning off automatic backups for the file system.
        public let status: Status

        public init(status: Status) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
        }
    }

    public struct BackupPolicyDescription: AWSDecodableShape {
        /// Describes the file system's backup policy, indicating whether automatic backups are turned on or off..
        public let backupPolicy: BackupPolicy?

        public init(backupPolicy: BackupPolicy? = nil) {
            self.backupPolicy = backupPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case backupPolicy = "BackupPolicy"
        }
    }

    public struct CreateAccessPointRequest: AWSEncodableShape {
        /// A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent creation.
        public let clientToken: String
        /// The ID of the EFS file system that the access point provides access to.
        public let fileSystemId: String
        /// The operating system user and group applied to all file system requests made using the access point.
        public let posixUser: PosixUser?
        /// Specifies the directory on the Amazon EFS file system that the access point exposes as the root directory of your file system to NFS clients using the access point. The clients using the access point can only access the root directory and below. If the RootDirectory &gt; Path specified does not exist, EFS creates it and applies the CreationInfo settings when a client connects to an access point. When specifying a RootDirectory, you need to provide the Path, and the CreationInfo is optional.
        public let rootDirectory: RootDirectory?
        /// Creates tags associated with the access point. Each tag is a key-value pair.
        public let tags: [Tag]?

        public init(clientToken: String = CreateAccessPointRequest.idempotencyToken(), fileSystemId: String, posixUser: PosixUser? = nil, rootDirectory: RootDirectory? = nil, tags: [Tag]? = nil) {
            self.clientToken = clientToken
            self.fileSystemId = fileSystemId
            self.posixUser = posixUser
            self.rootDirectory = rootDirectory
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.posixUser?.validate(name: "\(name).posixUser")
            try self.rootDirectory?.validate(name: "\(name).rootDirectory")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case fileSystemId = "FileSystemId"
            case posixUser = "PosixUser"
            case rootDirectory = "RootDirectory"
            case tags = "Tags"
        }
    }

    public struct CreateFileSystemRequest: AWSEncodableShape {
        /// A string of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.
        public let creationToken: String
        /// A Boolean value that, if true, creates an encrypted file system. When creating an encrypted file system, you have the option of specifying CreateFileSystemRequest$KmsKeyId for an existing AWS Key Management Service (AWS KMS) customer master key (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem, is used to protect the encrypted file system.
        public let encrypted: Bool?
        /// The ID of the AWS KMS CMK to be used to protect the encrypted file system. This parameter is only required if you want to use a nondefault CMK. If this parameter is not specified, the default CMK for Amazon EFS is used. This ID can be in one of the following formats:   Key ID - A unique identifier of the key, for example 1234abcd-12ab-34cd-56ef-1234567890ab.   ARN - An Amazon Resource Name (ARN) for the key, for example arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.   Key alias - A previously created display name for a key, for example alias/projectKey1.   Key alias ARN - An ARN for a key alias, for example arn:aws:kms:us-west-2:444455556666:alias/projectKey1.   If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter must be set to true.  EFS accepts only symmetric CMKs. You cannot use asymmetric CMKs with EFS file systems.
        public let kmsKeyId: String?
        /// The performance mode of the file system. We recommend generalPurpose performance mode for most file systems. File systems using the maxIO performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created.
        public let performanceMode: PerformanceMode?
        /// The throughput, measured in MiB/s, that you want to provision for a file system that you're creating. Valid values are 1-1024. Required if ThroughputMode is set to provisioned. The upper limit for throughput is 1024 MiB/s. You can get this limit increased by contacting AWS Support. For more information, see Amazon EFS Limits That You Can Increase in the Amazon EFS User Guide.
        public let provisionedThroughputInMibps: Double?
        /// A value that specifies to create one or more tags associated with the file system. Each tag is a user-defined key-value pair. Name your file system on creation by including a "Key":"Name","Value":"{value}" key-value pair.
        public let tags: [Tag]?
        /// The throughput mode for the file system to be created. There are two throughput modes to choose from for your file system: bursting and provisioned. If you set ThroughputMode to provisioned, you must also set a value for ProvisionedThroughPutInMibps. You can decrease your file system's throughput in Provisioned Throughput mode or change between the throughput modes as long as it’s been more than 24 hours since the last decrease or throughput mode change. For more, see Specifying Throughput with Provisioned Mode in the Amazon EFS User Guide.
        public let throughputMode: ThroughputMode?

        public init(creationToken: String = CreateFileSystemRequest.idempotencyToken(), encrypted: Bool? = nil, kmsKeyId: String? = nil, performanceMode: PerformanceMode? = nil, provisionedThroughputInMibps: Double? = nil, tags: [Tag]? = nil, throughputMode: ThroughputMode? = nil) {
            self.creationToken = creationToken
            self.encrypted = encrypted
            self.kmsKeyId = kmsKeyId
            self.performanceMode = performanceMode
            self.provisionedThroughputInMibps = provisionedThroughputInMibps
            self.tags = tags
            self.throughputMode = throughputMode
        }

        public func validate(name: String) throws {
            try self.validate(self.creationToken, name: "creationToken", parent: name, max: 64)
            try self.validate(self.creationToken, name: "creationToken", parent: name, min: 1)
            try self.validate(self.creationToken, name: "creationToken", parent: name, pattern: ".+")
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, pattern: "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|alias/[a-zA-Z0-9/_-]+|(arn:aws[-a-z]*:kms:[a-z0-9-]+:\\d{12}:((key/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(alias/[a-zA-Z0-9/_-]+))))$")
            try self.validate(self.provisionedThroughputInMibps, name: "provisionedThroughputInMibps", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case creationToken = "CreationToken"
            case encrypted = "Encrypted"
            case kmsKeyId = "KmsKeyId"
            case performanceMode = "PerformanceMode"
            case provisionedThroughputInMibps = "ProvisionedThroughputInMibps"
            case tags = "Tags"
            case throughputMode = "ThroughputMode"
        }
    }

    public struct CreateMountTargetRequest: AWSEncodableShape {
        /// The ID of the file system for which to create the mount target.
        public let fileSystemId: String
        /// Valid IPv4 address within the address range of the specified subnet.
        public let ipAddress: String?
        /// Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be for the same VPC as subnet specified.
        public let securityGroups: [String]?
        /// The ID of the subnet to add the mount target in.
        public let subnetId: String

        public init(fileSystemId: String, ipAddress: String? = nil, securityGroups: [String]? = nil, subnetId: String) {
            self.fileSystemId = fileSystemId
            self.ipAddress = ipAddress
            self.securityGroups = securityGroups
            self.subnetId = subnetId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.validate(self.ipAddress, name: "ipAddress", parent: name, max: 15)
            try self.validate(self.ipAddress, name: "ipAddress", parent: name, min: 7)
            try self.validate(self.ipAddress, name: "ipAddress", parent: name, pattern: "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$")
            try self.securityGroups?.forEach {
                try validate($0, name: "securityGroups[]", parent: name, max: 43)
                try validate($0, name: "securityGroups[]", parent: name, min: 11)
                try validate($0, name: "securityGroups[]", parent: name, pattern: "^sg-[0-9a-f]{8,40}")
            }
            try self.validate(self.securityGroups, name: "securityGroups", parent: name, max: 5)
            try self.validate(self.subnetId, name: "subnetId", parent: name, max: 47)
            try self.validate(self.subnetId, name: "subnetId", parent: name, min: 15)
            try self.validate(self.subnetId, name: "subnetId", parent: name, pattern: "^subnet-[0-9a-f]{8,40}$")
        }

        private enum CodingKeys: String, CodingKey {
            case fileSystemId = "FileSystemId"
            case ipAddress = "IpAddress"
            case securityGroups = "SecurityGroups"
            case subnetId = "SubnetId"
        }
    }

    public struct CreateTagsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The ID of the file system whose tags you want to modify (String). This operation modifies the tags only, not the file system.
        public let fileSystemId: String
        /// An array of Tag objects to add. Each Tag object is a key-value pair.
        public let tags: [Tag]

        public init(fileSystemId: String, tags: [Tag]) {
            self.fileSystemId = fileSystemId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct CreationInfo: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the POSIX group ID to apply to the RootDirectory. Accepts values from 0 to 2^32 (4294967295).
        public let ownerGid: Int64
        /// Specifies the POSIX user ID to apply to the RootDirectory. Accepts values from 0 to 2^32 (4294967295).
        public let ownerUid: Int64
        /// Specifies the POSIX permissions to apply to the RootDirectory, in the format of an octal number representing the file's mode bits.
        public let permissions: String

        public init(ownerGid: Int64, ownerUid: Int64, permissions: String) {
            self.ownerGid = ownerGid
            self.ownerUid = ownerUid
            self.permissions = permissions
        }

        public func validate(name: String) throws {
            try self.validate(self.ownerGid, name: "ownerGid", parent: name, max: 4_294_967_295)
            try self.validate(self.ownerGid, name: "ownerGid", parent: name, min: 0)
            try self.validate(self.ownerUid, name: "ownerUid", parent: name, max: 4_294_967_295)
            try self.validate(self.ownerUid, name: "ownerUid", parent: name, min: 0)
            try self.validate(self.permissions, name: "permissions", parent: name, pattern: "^[0-7]{3,4}$")
        }

        private enum CodingKeys: String, CodingKey {
            case ownerGid = "OwnerGid"
            case ownerUid = "OwnerUid"
            case permissions = "Permissions"
        }
    }

    public struct DeleteAccessPointRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "accessPointId", location: .uri(locationName: "AccessPointId"))
        ]

        /// The ID of the access point that you want to delete.
        public let accessPointId: String

        public init(accessPointId: String) {
            self.accessPointId = accessPointId
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteFileSystemPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// Specifies the EFS file system for which to delete the FileSystemPolicy.
        public let fileSystemId: String

        public init(fileSystemId: String) {
            self.fileSystemId = fileSystemId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteFileSystemRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The ID of the file system you want to delete.
        public let fileSystemId: String

        public init(fileSystemId: String) {
            self.fileSystemId = fileSystemId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMountTargetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "mountTargetId", location: .uri(locationName: "MountTargetId"))
        ]

        /// The ID of the mount target to delete (String).
        public let mountTargetId: String

        public init(mountTargetId: String) {
            self.mountTargetId = mountTargetId
        }

        public func validate(name: String) throws {
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, max: 45)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, min: 13)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, pattern: "^fsmt-[0-9a-f]{8,40}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteTagsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The ID of the file system whose tags you want to delete (String).
        public let fileSystemId: String
        /// A list of tag keys to delete.
        public let tagKeys: [String]

        public init(fileSystemId: String, tagKeys: [String]) {
            self.fileSystemId = fileSystemId
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?![aA]{1}[wW]{1}[sS]{1}:)([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case tagKeys = "TagKeys"
        }
    }

    public struct DescribeAccessPointsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "accessPointId", location: .querystring(locationName: "AccessPointId")),
            AWSMemberEncoding(label: "fileSystemId", location: .querystring(locationName: "FileSystemId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "MaxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "NextToken"))
        ]

        /// (Optional) Specifies an EFS access point to describe in the response; mutually exclusive with FileSystemId.
        public let accessPointId: String?
        /// (Optional) If you provide a FileSystemId, EFS returns all access points for that file system; mutually exclusive with AccessPointId.
        public let fileSystemId: String?
        /// (Optional) When retrieving all access points for a file system, you can optionally specify the MaxItems parameter to limit the number of objects returned in a response. The default value is 100.
        public let maxResults: Int?
        ///  NextToken is present if the response is paginated. You can use NextMarker in the subsequent request to fetch the next page of access point descriptions.
        public let nextToken: String?

        public init(accessPointId: String? = nil, fileSystemId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.accessPointId = accessPointId
            self.fileSystemId = fileSystemId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAccessPointsResponse: AWSDecodableShape {
        /// An array of access point descriptions.
        public let accessPoints: [AccessPointDescription]?
        /// Present if there are more access points than returned in the response. You can use the NextMarker in the subsequent request to fetch the additional descriptions.
        public let nextToken: String?

        public init(accessPoints: [AccessPointDescription]? = nil, nextToken: String? = nil) {
            self.accessPoints = accessPoints
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessPoints = "AccessPoints"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeBackupPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// Specifies which EFS file system to retrieve the BackupPolicy for.
        public let fileSystemId: String

        public init(fileSystemId: String) {
            self.fileSystemId = fileSystemId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFileSystemPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// Specifies which EFS file system to retrieve the FileSystemPolicy for.
        public let fileSystemId: String

        public init(fileSystemId: String) {
            self.fileSystemId = fileSystemId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFileSystemsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "creationToken", location: .querystring(locationName: "CreationToken")),
            AWSMemberEncoding(label: "fileSystemId", location: .querystring(locationName: "FileSystemId")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "Marker")),
            AWSMemberEncoding(label: "maxItems", location: .querystring(locationName: "MaxItems"))
        ]

        /// (Optional) Restricts the list to the file system with this creation token (String). You specify a creation token when you create an Amazon EFS file system.
        public let creationToken: String?
        /// (Optional) ID of the file system whose description you want to retrieve (String).
        public let fileSystemId: String?
        /// (Optional) Opaque pagination token returned from a previous DescribeFileSystems operation (String). If present, specifies to continue the list from where the returning call had left off.
        public let marker: String?
        /// (Optional) Specifies the maximum number of file systems to return in the response (integer). This number is automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems.
        public let maxItems: Int?

        public init(creationToken: String? = nil, fileSystemId: String? = nil, marker: String? = nil, maxItems: Int? = nil) {
            self.creationToken = creationToken
            self.fileSystemId = fileSystemId
            self.marker = marker
            self.maxItems = maxItems
        }

        public func validate(name: String) throws {
            try self.validate(self.creationToken, name: "creationToken", parent: name, max: 64)
            try self.validate(self.creationToken, name: "creationToken", parent: name, min: 1)
            try self.validate(self.creationToken, name: "creationToken", parent: name, pattern: ".+")
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.validate(self.marker, name: "marker", parent: name, max: 128)
            try self.validate(self.marker, name: "marker", parent: name, min: 1)
            try self.validate(self.marker, name: "marker", parent: name, pattern: ".+")
            try self.validate(self.maxItems, name: "maxItems", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFileSystemsResponse: AWSDecodableShape {
        /// An array of file system descriptions.
        public let fileSystems: [FileSystemDescription]?
        /// Present if provided by caller in the request (String).
        public let marker: String?
        /// Present if there are more file systems than returned in the response (String). You can use the NextMarker in the subsequent request to fetch the descriptions.
        public let nextMarker: String?

        public init(fileSystems: [FileSystemDescription]? = nil, marker: String? = nil, nextMarker: String? = nil) {
            self.fileSystems = fileSystems
            self.marker = marker
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case fileSystems = "FileSystems"
            case marker = "Marker"
            case nextMarker = "NextMarker"
        }
    }

    public struct DescribeLifecycleConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The ID of the file system whose LifecycleConfiguration object you want to retrieve (String).
        public let fileSystemId: String

        public init(fileSystemId: String) {
            self.fileSystemId = fileSystemId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeMountTargetSecurityGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "mountTargetId", location: .uri(locationName: "MountTargetId"))
        ]

        /// The ID of the mount target whose security groups you want to retrieve.
        public let mountTargetId: String

        public init(mountTargetId: String) {
            self.mountTargetId = mountTargetId
        }

        public func validate(name: String) throws {
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, max: 45)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, min: 13)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, pattern: "^fsmt-[0-9a-f]{8,40}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeMountTargetSecurityGroupsResponse: AWSDecodableShape {
        /// An array of security groups.
        public let securityGroups: [String]

        public init(securityGroups: [String]) {
            self.securityGroups = securityGroups
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroups = "SecurityGroups"
        }
    }

    public struct DescribeMountTargetsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "accessPointId", location: .querystring(locationName: "AccessPointId")),
            AWSMemberEncoding(label: "fileSystemId", location: .querystring(locationName: "FileSystemId")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "Marker")),
            AWSMemberEncoding(label: "maxItems", location: .querystring(locationName: "MaxItems")),
            AWSMemberEncoding(label: "mountTargetId", location: .querystring(locationName: "MountTargetId"))
        ]

        /// (Optional) The ID of the access point whose mount targets that you want to list. It must be included in your request if a FileSystemId or MountTargetId is not included in your request. Accepts either an access point ID or ARN as input.
        public let accessPointId: String?
        /// (Optional) ID of the file system whose mount targets you want to list (String). It must be included in your request if an AccessPointId or MountTargetId is not included. Accepts either a file system ID or ARN as input.
        public let fileSystemId: String?
        /// (Optional) Opaque pagination token returned from a previous DescribeMountTargets operation (String). If present, it specifies to continue the list from where the previous returning call left off.
        public let marker: String?
        /// (Optional) Maximum number of mount targets to return in the response. Currently, this number is automatically set to 10, and other values are ignored. The response is paginated at 100 per page if you have more than 100 mount targets.
        public let maxItems: Int?
        /// (Optional) ID of the mount target that you want to have described (String). It must be included in your request if FileSystemId is not included. Accepts either a mount target ID or ARN as input.
        public let mountTargetId: String?

        public init(accessPointId: String? = nil, fileSystemId: String? = nil, marker: String? = nil, maxItems: Int? = nil, mountTargetId: String? = nil) {
            self.accessPointId = accessPointId
            self.fileSystemId = fileSystemId
            self.marker = marker
            self.maxItems = maxItems
            self.mountTargetId = mountTargetId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.validate(self.marker, name: "marker", parent: name, max: 128)
            try self.validate(self.marker, name: "marker", parent: name, min: 1)
            try self.validate(self.marker, name: "marker", parent: name, pattern: ".+")
            try self.validate(self.maxItems, name: "maxItems", parent: name, min: 1)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, max: 45)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, min: 13)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, pattern: "^fsmt-[0-9a-f]{8,40}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeMountTargetsResponse: AWSDecodableShape {
        /// If the request included the Marker, the response returns that value in this field.
        public let marker: String?
        /// Returns the file system's mount targets as an array of MountTargetDescription objects.
        public let mountTargets: [MountTargetDescription]?
        /// If a value is present, there are more mount targets to return. In a subsequent request, you can provide Marker in your request with this value to retrieve the next set of mount targets.
        public let nextMarker: String?

        public init(marker: String? = nil, mountTargets: [MountTargetDescription]? = nil, nextMarker: String? = nil) {
            self.marker = marker
            self.mountTargets = mountTargets
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case mountTargets = "MountTargets"
            case nextMarker = "NextMarker"
        }
    }

    public struct DescribeTagsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "Marker")),
            AWSMemberEncoding(label: "maxItems", location: .querystring(locationName: "MaxItems"))
        ]

        /// The ID of the file system whose tag set you want to retrieve.
        public let fileSystemId: String
        /// (Optional) An opaque pagination token returned from a previous DescribeTags operation (String). If present, it specifies to continue the list from where the previous call left off.
        public let marker: String?
        /// (Optional) The maximum number of file system tags to return in the response. Currently, this number is automatically set to 100, and other values are ignored. The response is paginated at 100 per page if you have more than 100 tags.
        public let maxItems: Int?

        public init(fileSystemId: String, marker: String? = nil, maxItems: Int? = nil) {
            self.fileSystemId = fileSystemId
            self.marker = marker
            self.maxItems = maxItems
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.validate(self.marker, name: "marker", parent: name, max: 128)
            try self.validate(self.marker, name: "marker", parent: name, min: 1)
            try self.validate(self.marker, name: "marker", parent: name, pattern: ".+")
            try self.validate(self.maxItems, name: "maxItems", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeTagsResponse: AWSDecodableShape {
        /// If the request included a Marker, the response returns that value in this field.
        public let marker: String?
        /// If a value is present, there are more tags to return. In a subsequent request, you can provide the value of NextMarker as the value of the Marker parameter in your next request to retrieve the next set of tags.
        public let nextMarker: String?
        /// Returns tags associated with the file system as an array of Tag objects.
        public let tags: [Tag]

        public init(marker: String? = nil, nextMarker: String? = nil, tags: [Tag]) {
            self.marker = marker
            self.nextMarker = nextMarker
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case marker = "Marker"
            case nextMarker = "NextMarker"
            case tags = "Tags"
        }
    }

    public struct FileSystemDescription: AWSDecodableShape {
        /// The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).
        public let creationTime: Date
        /// The opaque string specified in the request.
        public let creationToken: String
        /// A Boolean value that, if true, indicates that the file system is encrypted.
        public let encrypted: Bool?
        /// The Amazon Resource Name (ARN) for the EFS file system, in the format arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id . Example with sample data: arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567
        public let fileSystemArn: String?
        /// The ID of the file system, assigned by Amazon EFS.
        public let fileSystemId: String
        /// The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the encrypted file system.
        public let kmsKeyId: String?
        /// The lifecycle phase of the file system.
        public let lifeCycleState: LifeCycleState
        /// You can add tags to a file system, including a Name tag. For more information, see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns the value in this field.
        public let name: String?
        /// The current number of mount targets that the file system has. For more information, see CreateMountTarget.
        public let numberOfMountTargets: Int
        /// The AWS account that created the file system. If the file system was created by an IAM user, the parent account to which the user belongs is the owner.
        public let ownerId: String
        /// The performance mode of the file system.
        public let performanceMode: PerformanceMode
        /// The throughput, measured in MiB/s, that you want to provision for a file system. Valid values are 1-1024. Required if ThroughputMode is set to provisioned. The limit on throughput is 1024 MiB/s. You can get these limits increased by contacting AWS Support. For more information, see Amazon EFS Limits That You Can Increase in the Amazon EFS User Guide.
        public let provisionedThroughputInMibps: Double?
        /// The latest known metered size (in bytes) of data stored in the file system, in its Value field, and the time at which that size was determined in its Timestamp field. The Timestamp value is the integer number of seconds since 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, SizeInBytes represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time.
        public let sizeInBytes: FileSystemSize
        /// The tags associated with the file system, presented as an array of Tag objects.
        public let tags: [Tag]
        /// The throughput mode for a file system. There are two throughput modes to choose from for your file system: bursting and provisioned. If you set ThroughputMode to provisioned, you must also set a value for ProvisionedThroughPutInMibps. You can decrease your file system's throughput in Provisioned Throughput mode or change between the throughput modes as long as it’s been more than 24 hours since the last decrease or throughput mode change.
        public let throughputMode: ThroughputMode?

        public init(creationTime: Date, creationToken: String, encrypted: Bool? = nil, fileSystemArn: String? = nil, fileSystemId: String, kmsKeyId: String? = nil, lifeCycleState: LifeCycleState, name: String? = nil, numberOfMountTargets: Int, ownerId: String, performanceMode: PerformanceMode, provisionedThroughputInMibps: Double? = nil, sizeInBytes: FileSystemSize, tags: [Tag], throughputMode: ThroughputMode? = nil) {
            self.creationTime = creationTime
            self.creationToken = creationToken
            self.encrypted = encrypted
            self.fileSystemArn = fileSystemArn
            self.fileSystemId = fileSystemId
            self.kmsKeyId = kmsKeyId
            self.lifeCycleState = lifeCycleState
            self.name = name
            self.numberOfMountTargets = numberOfMountTargets
            self.ownerId = ownerId
            self.performanceMode = performanceMode
            self.provisionedThroughputInMibps = provisionedThroughputInMibps
            self.sizeInBytes = sizeInBytes
            self.tags = tags
            self.throughputMode = throughputMode
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case creationToken = "CreationToken"
            case encrypted = "Encrypted"
            case fileSystemArn = "FileSystemArn"
            case fileSystemId = "FileSystemId"
            case kmsKeyId = "KmsKeyId"
            case lifeCycleState = "LifeCycleState"
            case name = "Name"
            case numberOfMountTargets = "NumberOfMountTargets"
            case ownerId = "OwnerId"
            case performanceMode = "PerformanceMode"
            case provisionedThroughputInMibps = "ProvisionedThroughputInMibps"
            case sizeInBytes = "SizeInBytes"
            case tags = "Tags"
            case throughputMode = "ThroughputMode"
        }
    }

    public struct FileSystemPolicyDescription: AWSDecodableShape {
        /// Specifies the EFS file system to which the FileSystemPolicy applies.
        public let fileSystemId: String?
        /// The JSON formatted FileSystemPolicy for the EFS file system.
        public let policy: String?

        public init(fileSystemId: String? = nil, policy: String? = nil) {
            self.fileSystemId = fileSystemId
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case fileSystemId = "FileSystemId"
            case policy = "Policy"
        }
    }

    public struct FileSystemSize: AWSDecodableShape {
        /// The time at which the size of data, returned in the Value field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.
        public let timestamp: Date?
        /// The latest known metered size (in bytes) of data stored in the file system.
        public let value: Int64
        /// The latest known metered size (in bytes) of data stored in the Infrequent Access storage class.
        public let valueInIA: Int64?
        /// The latest known metered size (in bytes) of data stored in the Standard storage class.
        public let valueInStandard: Int64?

        public init(timestamp: Date? = nil, value: Int64, valueInIA: Int64? = nil, valueInStandard: Int64? = nil) {
            self.timestamp = timestamp
            self.value = value
            self.valueInIA = valueInIA
            self.valueInStandard = valueInStandard
        }

        private enum CodingKeys: String, CodingKey {
            case timestamp = "Timestamp"
            case value = "Value"
            case valueInIA = "ValueInIA"
            case valueInStandard = "ValueInStandard"
        }
    }

    public struct LifecycleConfigurationDescription: AWSDecodableShape {
        /// An array of lifecycle management policies. Currently, EFS supports a maximum of one policy per file system.
        public let lifecyclePolicies: [LifecyclePolicy]?

        public init(lifecyclePolicies: [LifecyclePolicy]? = nil) {
            self.lifecyclePolicies = lifecyclePolicies
        }

        private enum CodingKeys: String, CodingKey {
            case lifecyclePolicies = "LifecyclePolicies"
        }
    }

    public struct LifecyclePolicy: AWSEncodableShape & AWSDecodableShape {
        ///  A value that describes the period of time that a file is not accessed, after which it transitions to the IA storage class. Metadata operations such as listing the contents of a directory don't count as file access events.
        public let transitionToIA: TransitionToIARules?

        public init(transitionToIA: TransitionToIARules? = nil) {
            self.transitionToIA = transitionToIA
        }

        private enum CodingKeys: String, CodingKey {
            case transitionToIA = "TransitionToIA"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "MaxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "NextToken")),
            AWSMemberEncoding(label: "resourceId", location: .uri(locationName: "ResourceId"))
        ]

        /// (Optional) Specifies the maximum number of tag objects to return in the response. The default value is 100.
        public let maxResults: Int?
        /// You can use NextToken in a subsequent request to fetch the next page of access point descriptions if the response payload was paginated.
        public let nextToken: String?
        /// Specifies the EFS resource you want to retrieve tags for. You can retrieve tags for EFS file systems and access points using this API endpoint.
        public let resourceId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        ///  NextToken is present if the response payload is paginated. You can use NextToken in a subsequent request to fetch the next page of access point descriptions.
        public let nextToken: String?
        /// An array of the tags for the specified EFS resource.
        public let tags: [Tag]?

        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct ModifyMountTargetSecurityGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "mountTargetId", location: .uri(locationName: "MountTargetId"))
        ]

        /// The ID of the mount target whose security groups you want to modify.
        public let mountTargetId: String
        /// An array of up to five VPC security group IDs.
        public let securityGroups: [String]?

        public init(mountTargetId: String, securityGroups: [String]? = nil) {
            self.mountTargetId = mountTargetId
            self.securityGroups = securityGroups
        }

        public func validate(name: String) throws {
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, max: 45)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, min: 13)
            try self.validate(self.mountTargetId, name: "mountTargetId", parent: name, pattern: "^fsmt-[0-9a-f]{8,40}$")
            try self.securityGroups?.forEach {
                try validate($0, name: "securityGroups[]", parent: name, max: 43)
                try validate($0, name: "securityGroups[]", parent: name, min: 11)
                try validate($0, name: "securityGroups[]", parent: name, pattern: "^sg-[0-9a-f]{8,40}")
            }
            try self.validate(self.securityGroups, name: "securityGroups", parent: name, max: 5)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroups = "SecurityGroups"
        }
    }

    public struct MountTargetDescription: AWSDecodableShape {
        /// The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in. For example, use1-az1 is an AZ ID for the us-east-1 Region and it has the same location in every AWS account.
        public let availabilityZoneId: String?
        /// The name of the Availability Zone (AZ) that the mount target resides in. AZs are independently mapped to names for each AWS account. For example, the Availability Zone us-east-1a for your AWS account might not be the same location as us-east-1a for another AWS account.
        public let availabilityZoneName: String?
        /// The ID of the file system for which the mount target is intended.
        public let fileSystemId: String
        /// Address at which the file system can be mounted by using the mount target.
        public let ipAddress: String?
        /// Lifecycle state of the mount target.
        public let lifeCycleState: LifeCycleState
        /// System-assigned mount target ID.
        public let mountTargetId: String
        /// The ID of the network interface that Amazon EFS created when it created the mount target.
        public let networkInterfaceId: String?
        /// AWS account ID that owns the resource.
        public let ownerId: String?
        /// The ID of the mount target's subnet.
        public let subnetId: String
        /// The Virtual Private Cloud (VPC) ID that the mount target is configured in.
        public let vpcId: String?

        public init(availabilityZoneId: String? = nil, availabilityZoneName: String? = nil, fileSystemId: String, ipAddress: String? = nil, lifeCycleState: LifeCycleState, mountTargetId: String, networkInterfaceId: String? = nil, ownerId: String? = nil, subnetId: String, vpcId: String? = nil) {
            self.availabilityZoneId = availabilityZoneId
            self.availabilityZoneName = availabilityZoneName
            self.fileSystemId = fileSystemId
            self.ipAddress = ipAddress
            self.lifeCycleState = lifeCycleState
            self.mountTargetId = mountTargetId
            self.networkInterfaceId = networkInterfaceId
            self.ownerId = ownerId
            self.subnetId = subnetId
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case availabilityZoneId = "AvailabilityZoneId"
            case availabilityZoneName = "AvailabilityZoneName"
            case fileSystemId = "FileSystemId"
            case ipAddress = "IpAddress"
            case lifeCycleState = "LifeCycleState"
            case mountTargetId = "MountTargetId"
            case networkInterfaceId = "NetworkInterfaceId"
            case ownerId = "OwnerId"
            case subnetId = "SubnetId"
            case vpcId = "VpcId"
        }
    }

    public struct PosixUser: AWSEncodableShape & AWSDecodableShape {
        /// The POSIX group ID used for all file system operations using this access point.
        public let gid: Int64
        /// Secondary POSIX group IDs used for all file system operations using this access point.
        public let secondaryGids: [Int64]?
        /// The POSIX user ID used for all file system operations using this access point.
        public let uid: Int64

        public init(gid: Int64, secondaryGids: [Int64]? = nil, uid: Int64) {
            self.gid = gid
            self.secondaryGids = secondaryGids
            self.uid = uid
        }

        public func validate(name: String) throws {
            try self.validate(self.gid, name: "gid", parent: name, max: 4_294_967_295)
            try self.validate(self.gid, name: "gid", parent: name, min: 0)
            try self.secondaryGids?.forEach {
                try validate($0, name: "secondaryGids[]", parent: name, max: 4_294_967_295)
                try validate($0, name: "secondaryGids[]", parent: name, min: 0)
            }
            try self.validate(self.secondaryGids, name: "secondaryGids", parent: name, max: 16)
            try self.validate(self.secondaryGids, name: "secondaryGids", parent: name, min: 0)
            try self.validate(self.uid, name: "uid", parent: name, max: 4_294_967_295)
            try self.validate(self.uid, name: "uid", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case gid = "Gid"
            case secondaryGids = "SecondaryGids"
            case uid = "Uid"
        }
    }

    public struct PutBackupPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The backup policy included in the PutBackupPolicy request.
        public let backupPolicy: BackupPolicy
        /// Specifies which EFS file system to update the backup policy for.
        public let fileSystemId: String

        public init(backupPolicy: BackupPolicy, fileSystemId: String) {
            self.backupPolicy = backupPolicy
            self.fileSystemId = fileSystemId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: String, CodingKey {
            case backupPolicy = "BackupPolicy"
        }
    }

    public struct PutFileSystemPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// (Optional) A flag to indicate whether to bypass the FileSystemPolicy lockout safety check. The policy lockout safety check determines whether the policy in the request will prevent the principal making the request will be locked out from making future PutFileSystemPolicy requests on the file system. Set BypassPolicyLockoutSafetyCheck to True only when you intend to prevent the principal that is making the request from making a subsequent PutFileSystemPolicy request on the file system. The default value is False.
        public let bypassPolicyLockoutSafetyCheck: Bool?
        /// The ID of the EFS file system that you want to create or update the FileSystemPolicy for.
        public let fileSystemId: String
        /// The FileSystemPolicy that you're creating. Accepts a JSON formatted policy definition. To find out more about the elements that make up a file system policy, see EFS Resource-based Policies.
        public let policy: String

        public init(bypassPolicyLockoutSafetyCheck: Bool? = nil, fileSystemId: String, policy: String) {
            self.bypassPolicyLockoutSafetyCheck = bypassPolicyLockoutSafetyCheck
            self.fileSystemId = fileSystemId
            self.policy = policy
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: String, CodingKey {
            case bypassPolicyLockoutSafetyCheck = "BypassPolicyLockoutSafetyCheck"
            case policy = "Policy"
        }
    }

    public struct PutLifecycleConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The ID of the file system for which you are creating the LifecycleConfiguration object (String).
        public let fileSystemId: String
        /// An array of LifecyclePolicy objects that define the file system's LifecycleConfiguration object. A LifecycleConfiguration object tells lifecycle management when to transition files from the Standard storage class to the Infrequent Access storage class.
        public let lifecyclePolicies: [LifecyclePolicy]

        public init(fileSystemId: String, lifecyclePolicies: [LifecyclePolicy]) {
            self.fileSystemId = fileSystemId
            self.lifecyclePolicies = lifecyclePolicies
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
        }

        private enum CodingKeys: String, CodingKey {
            case lifecyclePolicies = "LifecyclePolicies"
        }
    }

    public struct RootDirectory: AWSEncodableShape & AWSDecodableShape {
        /// (Optional) Specifies the POSIX IDs and permissions to apply to the access point's RootDirectory. If the RootDirectory &gt; Path specified does not exist, EFS creates the root directory using the CreationInfo settings when a client connects to an access point. When specifying the CreationInfo, you must provide values for all properties.   If you do not provide CreationInfo and the specified RootDirectory &gt; Path does not exist, attempts to mount the file system using the access point will fail.
        public let creationInfo: CreationInfo?
        /// Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the CreationInfo.
        public let path: String?

        public init(creationInfo: CreationInfo? = nil, path: String? = nil) {
            self.creationInfo = creationInfo
            self.path = path
        }

        public func validate(name: String) throws {
            try self.creationInfo?.validate(name: "\(name).creationInfo")
            try self.validate(self.path, name: "path", parent: name, max: 100)
            try self.validate(self.path, name: "path", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case creationInfo = "CreationInfo"
            case path = "Path"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag key (String). The key can't start with aws:.
        public let key: String
        /// The value of the tag key.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^(?![aA]{1}[wW]{1}[sS]{1}:)([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceId", location: .uri(locationName: "ResourceId"))
        ]

        /// The ID specifying the EFS resource that you want to create a tag for.
        public let resourceId: String
        public let tags: [Tag]

        public init(resourceId: String, tags: [Tag]) {
            self.resourceId = resourceId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceId", location: .uri(locationName: "ResourceId")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring(locationName: "tagKeys"))
        ]

        /// Specifies the EFS resource that you want to remove tags from.
        public let resourceId: String
        /// The keys of the key:value tag pairs that you want to remove from the specified EFS resource.
        public let tagKeys: [String]

        public init(resourceId: String, tagKeys: [String]) {
            self.resourceId = resourceId
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?![aA]{1}[wW]{1}[sS]{1}:)([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UpdateFileSystemRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "fileSystemId", location: .uri(locationName: "FileSystemId"))
        ]

        /// The ID of the file system that you want to update.
        public let fileSystemId: String
        /// (Optional) The amount of throughput, in MiB/s, that you want to provision for your file system. Valid values are 1-1024. Required if ThroughputMode is changed to provisioned on update. If you're not updating the amount of provisioned throughput for your file system, you don't need to provide this value in your request.
        public let provisionedThroughputInMibps: Double?
        /// (Optional) The throughput mode that you want your file system to use. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the ThroughputMode to provisioned, you must also set a value for ProvisionedThroughputInMibps.
        public let throughputMode: ThroughputMode?

        public init(fileSystemId: String, provisionedThroughputInMibps: Double? = nil, throughputMode: ThroughputMode? = nil) {
            self.fileSystemId = fileSystemId
            self.provisionedThroughputInMibps = provisionedThroughputInMibps
            self.throughputMode = throughputMode
        }

        public func validate(name: String) throws {
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, max: 128)
            try self.validate(self.fileSystemId, name: "fileSystemId", parent: name, pattern: "^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$")
            try self.validate(self.provisionedThroughputInMibps, name: "provisionedThroughputInMibps", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case provisionedThroughputInMibps = "ProvisionedThroughputInMibps"
            case throughputMode = "ThroughputMode"
        }
    }
}
